Make inline completion insert the prefix at the right spot. (#170146, Doug
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Mar 2005 18:09:24 +0000 (18:09 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 17 Mar 2005 18:09:24 +0000 (18:09 +0000)
2005-03-17  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
Make inline completion insert the prefix at the
right spot.  (#170146, Doug Quale)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkentrycompletion.c

index e792fcdb3db7065992ac18c3c9c9e59710e0d6f1..a24a0a3e4691d25bd5f097e975bfa5ebe0c78116 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
+       Make inline completion insert the prefix at the
+       right spot.  (#170146, Doug Quale)
+
 2005-03-17  Tor Lillqvist  <tml@novell.com>
 
        * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
index e792fcdb3db7065992ac18c3c9c9e59710e0d6f1..a24a0a3e4691d25bd5f097e975bfa5ebe0c78116 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
+       Make inline completion insert the prefix at the
+       right spot.  (#170146, Doug Quale)
+
 2005-03-17  Tor Lillqvist  <tml@novell.com>
 
        * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
index e792fcdb3db7065992ac18c3c9c9e59710e0d6f1..a24a0a3e4691d25bd5f097e975bfa5ebe0c78116 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
+       Make inline completion insert the prefix at the
+       right spot.  (#170146, Doug Quale)
+
 2005-03-17  Tor Lillqvist  <tml@novell.com>
 
        * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
index 9672e48317cffb03aa527a3493268257ff4ecec8..4af7527a56017ee96b7fab9bcee240aaa65ff1b2 100644 (file)
@@ -1468,7 +1468,6 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
     {
       gint key_len;
       gint prefix_len;
-      gint pos;
       const gchar *key;
 
       prefix_len = g_utf8_strlen (prefix, -1);
@@ -1478,6 +1477,8 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
 
       if (prefix_len > key_len)
        {
+         gint pos = prefix_len;
+
          gtk_editable_insert_text (GTK_EDITABLE (completion->priv->entry),
                                    prefix + key_len, -1, &pos);
          gtk_editable_select_region (GTK_EDITABLE (completion->priv->entry),